package backend_0010;
import java.lang.Math;
public class Circle implements Perarea{
    public double radius;

    public Circle(double radius){
        this.radius=radius;
    }

    @Override
    public double get_area() {
        return Math.PI*Math.pow(radius,2);
    }

    @Override
    public double get_perimeter() {
        return 2*Math.PI*radius;
    }



    public static void main(String[] args) {
        Circle circle=new Circle(5);
        Perarea perarea=circle;
        System.out.println("圆的面积:"+perarea.get_area());
        System.out.println("圆的周长:"+perarea.get_perimeter());
    }

}
